import Vue from 'vue'
import App from './App.vue'
// 导入路由
import router from './router'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import './static/iconfont/iconfont.css'
import 'swiper/css/swiper.css'
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import 'vue-video-player/src/custom-theme.css'
import axios from 'axios'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Vant from 'vant';
import emotion from "./utils/emotion";
import 'vant/lib/index.css';
import store from './store'
// import './assets/font_4122508_2y2a90z41ca/iconfont.css'
import {ShareSheet, ActionSheet, Icon} from "vant";
import {Toast} from 'vant';
import VanTabs from 'vant/lib/tabs';
import VanTab from 'vant/lib/tab';
import VueLazyload from 'vue-lazyload';
import * as socketApi from './utils/wssocket';
import * as  enums from './utils/enums';

Vue.prototype.$enums = enums; // 枚举
Vue.prototype.$wsApi = socketApi;
Vue.use(VueLazyload, {
    error: require('./assets/shopping/payStatus/ygb.png'),
    loading: require('./assets/shopping/zwt.png'),
})


// import { Lazyload } from 'vant';

// Vue.use(Lazyload);

// 注册时可以配置额外的选项
// Vue.use(Lazyload, {
//     lazyComponent: true,
// });

import vView from 'vue-view-lazy'

Vue.use(vView, {
    error: require('./assets/shopping/payStatus/ygb.png'),
    loading: require('./assets/shopping/zwt.png'),
});
Vue.use(Toast);

Vue.prototype.$emo = emotion; // emo表情
Vue.prototype.$toast = Toast
Vue.use(ShareSheet);
Vue.use(ActionSheet);
Vue.use(Icon)
Vue.use(Vant)
Vue.use(VanTabs);
Vue.use(VanTab);
Vue.use(ElementUI, {
    size: 'small',
    menuType: 'text'
})
Vue.prototype.$axios = axios
axios.defaults.baseURL = "/api"

Vue.use(VueVideoPlayer)
Vue.use(VueAwesomeSwiper)
Vue.config.productionTip = false
new Vue({
    // 注册路由
    router,
    store,
    render: h => h(App),
}).$mount('#app')
